<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

</head>
<body>

<h3>书籍列表</h3>

<table border="1">
    <thead>
    <tr>
        <th>序号</th>
        <th>ID</th>
        <th>书名</th>
        <th>出版社</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    {% for book in all_books %}

        <tr>
            <td>{{ forloop.counter }}</td>
            <td>{{ book.pk }}</td>
            <td>{{ book.title }}</td>
            <td>{{ book.pub.name }}</td>
            <td>
                <a href="/book_del/?pk={{ book.pk }}">删除</a>
                <a href="/book_edit/?pk={{ book.pk }}">编辑</a>
            </td>

        </tr>
    {% endfor %}


    </tbody>

</table>


</body>
</html>